package cn.edu.cuit.controller;
import cn.edu.cuit.common.base.RespResult;
import cn.edu.cuit.domain.dto.LoginFormParamDTO;
import cn.edu.cuit.service.SysUserService;
import cn.edu.cuit.service.impl.SysUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired // 依赖注入：从容器中去找到对象绑定
    private SysUserService sysUserService;

    // 登录接口
    @PostMapping("/login")
    public RespResult login(@RequestBody LoginFormParamDTO loginFormParam){
         return sysUserService.login(loginFormParam);
    }

}
